home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / AMICUS / AMICUS15.ADF / Progs / Ask.DOC < prev    next >
Text File  |  1988-04-20  |  2KB  |  50 lines

  1.                          AUGment - Amiga Users Group
  2.                                 P.O. Box 1863
  3.                            Fremont, CA  94538-0186
  4.                               (415) 651-1160 voice
  5.                               (415) 659-9169 BBS
  6.  
  7. ASK:  A utility to prompt a user for a yes/no answer, and returns a level 5
  8. error code if a negative response is entered.  Use in batch files to give
  9. diversity in the execution of your commands.  Example:
  10.  
  11.         echo "My WorkBench Disk"
  12.         date ? to bootdate
  13.         failat 6
  14.         ask  Do you wish to load Workbench?
  15.         if warn
  16.          echo Very well, have a nice day!
  17.         else
  18.           loadwb
  19.           ask  Do you want to retain this cli?
  20.           if warn
  21.            endcli > nil:
  22.           endif
  23.         endif
  24.  
  25.       With the foregoing startup-sequence, you can decide at boot whether
  26. or not you want WorkBench or CLI or both.  
  27.  
  28.  
  29.       This program is written in whitebook C on the fly.  I don't have time
  30. to really do much public domain programming, so what I do is usually thrown
  31. together.  This DOC file should be bundled with the program and it's source
  32. (ask & ask.c). It was compiled with Aztec C (Manx), and is strickly K&R C
  33. as it is a CLI utility.
  34.  
  35.       You are more than welcome to send me comments, or make adjustments to
  36. the program.  Please give this the widest possible distribution, and
  37. include all three files (Program, Doc and Source).
  38.  
  39.       What I hope to do in the future is give a four branch possibility,
  40. but the "if <warn | error | fail>" option works on the last command
  41. envoked, so since the command "else" returns a success code, I am stopped
  42. in my tracks.
  43.  
  44. Inspired by the IBM ask, and requested by my co-hort and brother-in-law,
  45. John Sanders, I give this package to you.  In the IBM, the program returns
  46. an ERRORLEVEL, which is kept resident to the batch file, thus branches can
  47. be made on a variety of errorlevels with nested conditionals.  Too bad I
  48. can't do it on the Amiga, unless some of you folks have any suggestions?
  49. Thanks... BCnU...Jim
  50.